/* 保证表格中的 input 和按钮垂直居中 */
:host ::ng-deep {
    .table td {
        vertical-align: middle;
    }
}

/* 调整 radio button 的间距 */
.form-check-inline {
    margin-right: 1.5rem;
}

/* Modal styles */
.modal-dialog {
  max-width: 1200px;
}

.modal-content {
  border: none;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, #0396FF 0%, #0D47A1 100%);
  padding: 1.25rem 1.5rem;
  border: none;
  
  .modal-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;

    i {
      font-size: 1.4rem;
    }

    &::before {
      content: '';
      display: inline-block;
      width: 4px;
      height: 24px;
      background: white;
      border-radius: 2px;
      margin-right: 0.5rem;
    }
  }

  .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: all 0.2s;
    padding: 0.75rem;

    &:hover {
      opacity: 1;
      transform: rotate(90deg);
    }
  }
}

.modal-body {
  padding: 1.5rem;
  background: #fff;

  .info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;

    .info-item {
      .label {
        color: #566a7f;
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;

        i {
          color: #0396FF;
          font-size: 1rem;
        }
      }

      .value {
        color: #2c3345;
        font-weight: 500;
        font-size: 0.95rem;
        padding: 0.5rem 0.75rem;
        background: #f8f9fa;
        border-radius: 6px;
        border: 1px solid #e9ecef;
        min-height: 38px;
        display: flex;
        align-items: center;
      }
    }
  }

  .section-title {
    color: #2c3345;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.75rem;

    i {
      color: #0396FF;
      font-size: 1.2rem;
    }
  }

  .table {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1rem;

    thead {
      background: #f8f9fa;
      
      th {
        color: #566a7f;
        font-weight: 600;
        font-size: 0.9rem;
        padding: 1rem;
        border-bottom: 2px solid #e9ecef;
        white-space: nowrap;
        vertical-align: middle;
      }
    }

    tbody {
      tr {
        transition: all 0.2s;

        &:hover {
          background-color: rgba(3, 150, 255, 0.05);
        }

        td {
          padding: 1rem;
          vertical-align: middle;
          color: #444;
          font-size: 0.9rem;
          border-bottom: 1px solid #e9ecef;

          &:first-child {
            font-weight: 500;
          }
        }
      }

      .empty-row {
        text-align: center;
        padding: 2rem;
        color: #6c757d;

        i {
          font-size: 2rem;
          margin-bottom: 0.5rem;
          display: block;
        }
      }
    }
  }

  .remarks {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;

    .remarks-title {
      color: #566a7f;
      font-weight: 500;
      font-size: 0.9rem;
      margin-bottom: 0.5rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;

      i {
        color: #0396FF;
      }
    }

    .remarks-content {
      color: #444;
      font-size: 0.9rem;
      line-height: 1.5;
    }
  }
}

.modal-footer {
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  padding: 1rem 1.5rem;

  .btn {
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;

    i {
      font-size: 1.1rem;
    }

    &:active {
      transform: translateY(1px);
    }
  }

  .btn-primary {
    background: linear-gradient(135deg, #0396FF 0%, #0D47A1 100%);
    border: none;
    color: white;
    
    &:hover {
      background: linear-gradient(135deg, #0277cc 0%, #093777 100%);
    }
  }

  .btn-secondary {
    background: #e9ecef;
    border: none;
    color: #566a7f;
    
    &:hover {
      background: #dee2e6;
    }
  }
}

// 响应式调整
@media (max-width: 992px) {
  .modal-dialog {
    max-width: 95%;
    margin: 1rem auto;
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 576px) {
  .modal-body {
    padding: 1rem;
  }

  .info-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

// 动画效果
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-content {
  animation: modalFadeIn 0.3s ease-out;
}

// 状态标签样式
.status-badge {
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  
  i {
    font-size: 0.9rem;
  }

  &.status-pending {
    background-color: #fff4de;
    color: #ffa800;
    border: 1px solid rgba(255, 168, 0, 0.2);
  }

  &.status-completed {
    background-color: #e8fff3;
    color: #28c76f;
    border: 1px solid rgba(40, 199, 111, 0.2);
  }

  &.status-processing {
    background-color: #e0f4ff;
    color: #0396FF;
    border: 1px solid rgba(3, 150, 255, 0.2);
  }
}

// 文件附件样式
.attachment-section {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;

  .attachment-title {
    color: #566a7f;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;

    i {
      color: #0396FF;
    }
  }

  .attachment-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border: 1px dashed #dee2e6;

    i {
      font-size: 1.5rem;
      color: #0396FF;
    }

    .file-info {
      flex: 1;
      
      .file-name {
        color: #2c3345;
        font-weight: 500;
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
      }

      .file-size {
        color: #6c757d;
        font-size: 0.8rem;
      }
    }

    .download-btn {
      padding: 0.4rem 0.8rem;
      font-size: 0.85rem;
      color: #0396FF;
      background: rgba(3, 150, 255, 0.1);
      border-radius: 6px;
      display: flex;
      align-items: center;
      gap: 0.4rem;
      transition: all 0.2s;

      &:hover {
        background: rgba(3, 150, 255, 0.2);
      }

      i {
        font-size: 1rem;
      }
    }
  }
} 